<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>倒计时body</title>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/hui/Hui.css"/>
    <style>
        .bottom_style {
            background: -webkit-linear-gradient(top,#FF6E50,#FE4032);
            border-radius: 25px;
            -webkit-border-radius: 25px;
        }
    </style>
</head>
<body class="H-flexbox-vertical">
<div id="top" class="H-flex-item">
    <img src="__PUBLIC__/phone/Portal/images/count_donw03.gif" width="100%" />
    <span id="day_show" class="H-theme-font-color-white H-text-align-center" style="position: relative;left:42%;bottom: 145px;font-size: 7.0rem;">0</span>
</div>
<div id="retroclockbox1" class="H-center-all"></div>
<div class="time-item H-center-all">
    <strong id="hour_show" class="H-font-size-18 H-theme-background-color-black H-theme-font-color-white H-padding-5 H-border-radius-5 H-margin-horizontal-both-5">0时</strong>
    <strong id="minute_show" class="H-font-size-18 H-theme-background-color-black H-theme-font-color-white H-padding-5 H-border-radius-5">0分</strong>
    <strong id="second_show" class="H-font-size-18 H-theme-background-color-black H-theme-font-color-white H-padding-5 H-border-radius-5 H-margin-horizontal-both-5">0秒</strong>
</div><!--倒计时模块-->
<div tapmode="" onclick="prize();" class="bottom_style H-font-size-16 H-theme-font-color-white H-text-align-center" style="margin: 20px 20px;padding: 10px">
    推荐用户，即可获得相应奖励
</div>
</body>
<script type="text/javascript" src="__PUBLIC__/phone/Portal/js/zepto.min.js"></script>
<script type="text/javascript">
    apiready = function() {
    };
    var endTime = (new Date("2016/11/19 00:00:00")).getTime();
    var startTime = new Date().getTime();
    //		console.log('intDiff=='+(endTime - startTime));
    var intDiff = parseInt((endTime - startTime) / 1000);
    //倒计时总秒数量
    function timer(intDiff) {
        window.setInterval(function() {
            var day = 0, hour = 0, minute = 0, second = 0;
            //时间默认值
            if (intDiff > 0) {
                day = Math.floor(intDiff / (60 * 60 * 24));
                hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
                minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
                second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
            }
            if (minute <= 9)
                minute = '0' + minute;
            if (second <= 9)
                second = '0' + second;
            $('#day_show').html(day);
            $('#hour_show').html('<s id="h"></s>' + hour + '时');
            $('#minute_show').html('<s></s>' + minute + '分');
            $('#second_show').html('<s></s>' + second + '秒');
            intDiff--;
        }, 1000);
    }

    $(function() {
        timer(intDiff);
    });
    //推荐跳转 ok
    function prize() {
        var delay = 0;
        if (api.systemType != 'ios') {
            delay = 200;
        }
        api.openWin({
            name : 'prize_type_header',
            url : '../../main/me/prize/prize_type_header.html',
            bounces : false,
            delay : delay,
            slidBackEnabled : true,
            vScrollBarEnabled : false
        });
    }
</script>
</html>